const net = "https://mall.sgzhineng.com/"
//post请求
function Cpic_fetchPost(port, jsonParm, callback) {
  var req_url = net + port;
  wx.request({
    method: 'post',
    url: req_url,
    header: { 'Content-type': 'application/x-www-form-urlencoded' },
    data: JSON.stringify(jsonParm),
    success(res) {
      // wx.hideToast();
      var res_status = res.statusCode;
      //下面的showtoast 有问题 show 不出来
      if (res_status === 200) {
        callback('', res.data);
      } else {
        callback('请求返回异常', '');
      }
    },
    fail(e) {
      callback(e)
    },
    complete: function () {
    }
  })
}
module.exports = {
  Cpic_fetchPost: Cpic_fetchPost,
}